package com.fei.service;

import com.fei.bean.BroadcastBean;
import com.fei.mapper.BroadcastMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BroadcastServiceImpl implements BroadcastService{

    @Autowired
    BroadcastMapper broadcastMapper;

    @Override
    public Boolean selectCountMusicService(BroadcastBean broadcastBean) {
        Integer num = broadcastMapper.selectCountMusic(broadcastBean);
        if(num == 0){
            return true;
        }
        return false;
    }

    @Override
    public BroadcastBean selectOneBroadIdService(int id) {
        return broadcastMapper.selectOneBroadId(id);
    }

    @Override
    public int insertBroadcastService(BroadcastBean broadcastBean) {
        return broadcastMapper.insertBroadcast(broadcastBean);
    }

    @Override
    public int deleteOneMusicIdService(Integer music_id) {
        return broadcastMapper.deleteOneMusicId(music_id);
    }

}
